◊ This program is distributed as Shareware: if you like it or use it please honor the shareware system by sending $5 to the author at the address above. Since collecting international cheques is very expensive, please send cash only. If you MUST send a cheque, keep in mind that the banks will gobble up more than half of it.
◊ NOTE: Getting some bucks is what you write shareware for, but getting a note, a postcard or anything else is a lot better than getting nothing. I'd like to know how far this program has gone, so remember that you can do something nice even if you don't have a couple of $$$ to spare.
• GENERAL INFO
◊ CalConvert (formerly QuickConvert) is a small shareware utility that does integer arithmetic calculations and converts integer values to different bases (decimal, hexadecimal, binary, octal or any custom base between 2 and 32) or to an OSType (a sequence of four ASCII characters). The conversion may be signed or unsigned (you can always enter a signed value, it will be converted to unsigned if needed); the result may be interpreted either as a word (2 bytes) or as a long word (4 bytes). The Return and Enter keys start the conversion; Tab, shift-Tab and the four arrow keys have their usual meaning.
• CONFIGURATION
◊ Choosing the "Fields" item from the "Options" menu will bring up a configuration dialog that can be used to fully customize CalConvert. CalConvert can show up to 8 fields; each field contains either a mathematical expression, a sequence of 1 to 4 characters (OSType) or an integer number in any base from 2 to 32.
• THE ARITHMETIC CALCULATOR
◊ You may enter numerical expressions in fields labeled "Math" (things like "(12*(128-$20))<<2+2^8"); the result will be shown in all the other fields of the window when you press <return>. If the expression can't be parsed correctly, you will hear a beep and the other fields will change to zero. The next paragraphs will explain the syntax and operators you may use in your numerical expressions.
• SYNTAX NOTES FOR THE MATH FIELD
xxx (x=0->9) is a number
$xxx (x=0->F) is an hexadecimal number
-xxx, -$xxx, $-xxx are negative numbers
all numbers are interpreted as 32-bit signed integers
'(' and ')' can be used and nested
spaces allowed between numbers and operators
no spaces allowed inside numbers or operators
• ORDER OF OPERATORS
operators in the upper lines are calculated first;
operators in the same line are calculated sequentially:
^ **
* / : % << >>
& AND | OR \ XOR
+ -
= == != <> < > <= >=
• ARITHMETIC OPERATORS
'+' add
'-' subtract
'*' multiply
'/' divide
':' divide
'%' remainder
'^' power
'**' power
• LOGICAL OPERATORS (return 1 if true, 0 if false)
'=' equal to
'==' equal to
'!=' not equal to
'<>' not equal to
'<' less than
'>' greater than
'<=' less or equal
'>=' greater or equal
• BITWISE OPERATORS
'<<' bit shift left
'>>' bit shift right
'&' bit and
'AND' bit and
'and' bit and
'|' bit or
'OR' bit or
'or' bit or
'\' exclusive or
'XOR' exclusive or
'xor' exclusive or
• VERSION HISTORY
◊ 1.1 - Removed System 7 dependance and custom window definition
◊ 1.06 - Added online help, changed some menu keys to follow Apple's guidelines and fixed window position saving for multiple monitors
◊ 1.05 - Fixed an incoherent behaviour of the "Fields" dialog
◊ 1.04 - Changed name, dialogs, info and docs to CalConvert
◊ 1.03 - First shareware version with the arithmetic parser
◊ 1.02 - First public release in send-me-a-postcard-ware
◊ 1.01 - Menus added, but still looks like a quick hack
◊ 1.00 - Written for my personal use only, sports a very poor interface
• HAVE FUN! And don't forget to $$$ SEND YOUR CONTRIBUTION $$$ so that more cool utilities will see the light in the near future, at the low-low-low costs of shareware.